home *** CD-ROM | disk | FTP | other *** search
- /*
- File: main.h
-
- Contains: An extremely basic encoder utility to assist in building all of the various
- "compiled" resources used by MoofWars. Many of the encoder utilities are actually
- handled by things in the standard TGraphic class, so the main reason for pre-encoding
- the graphics is to improve the time to load the graphics in the game.
-
- Written by: Timothy Carroll
-
- Copyright: Copyright © 1996-1999 by Apple Computer, Inc., All Rights Reserved.
-
- You may incorporate this Apple sample source code into your program(s) without
- restriction. This Apple sample source code has been provided "AS IS" and the
- responsibility for its operation is yours. You are not permitted to redistribute
- this Apple sample source code as "Apple sample source code" after having made
- changes. If you're going to re-distribute the source, we require that you make
- it clear in the source that the code was descended from Apple sample source
- code, but that you've made changes.
-
- Change History (most recent first):
- 7/1/1999 Karl Groethe Updated for Metrowerks Codewarror Pro 2.1
- 2/27/97 Timothy Carroll Conditionally include Metrowerks headers
- to be more compiler-friendly
- 2/27/97 Timothy Carroll Now load app conditionals and error macros
- from separate files
- 8/15/96 Timothy Carroll Initial Release
- #
- #
- #
- #
-
- */
-
- #ifndef _MOOFENCODE_
- #define _MOOFENCODE_
-
- #pragma once
-
- #include <Quickdraw.h>
- #include <QDOffscreen.h>
- #include <Palettes.h>
- #include <DrawSprocket.h>
-
-
- #include "AppConditionals.h"
-
-
-
-
- /*********************************************************************************
- OTHER NECESSARY HEADERS
- *********************************************************************************/
- #include "Scaling.h"
- #include "TGraphicCollection.h"
-
-
- /*********************************************************************************
- CONSTANTS
- *********************************************************************************/
-
-
- // A few standard colors -- probably should use palette calls instead!
- const RGBColor kWhite = {0xFFFF, 0xFFFF, 0xFFFF};
- const RGBColor kBlack = {0x0000, 0x0000, 0x0000};
- const RGBColor kDarkBlue = {0x0000,0x0000,0x7000};
- const RGBColor kLtGrey = {0xC000,0xC000,0xC000};
- const RGBColor kMediumGrey = {0x7FFF,0x7FFF,0x7FFF};
-
- // The ResID of the application's color table. All of my custom graphics routines use
- // an 8-bit color table and the sprite is encoded to use these colors. The actual variable
- // to hold the color table is declared below.
-
- enum {
- kAppColorTableResID = 128
- };
-
- // Various constants used to load the background tile and sprite graphics.
-
- enum {
- kGridResourceID = 500
- };
-
- enum {
- kPreferredDepth = 8
- };
-
- // We'll use these contants to tailor the Application's behavior.
- enum {
- kEventInterval = 3,
- kNumberOfMasters = 10,
- kSleepTime = 0
- };
-
- // Constants for all the menu functions
- enum
- {
- rMenuBar = 128,
- mAppleMenu = 128,
- iAboutApp = 1,
- mFileMenu = 129,
- iEncodeIcons = 1,
- iEncodePICTs = 2,
- iTriplePICTs = 4,
- iEncodeTiles = 5,
- iQuit = 7
- };
-
- /*********************************************************************************
- Globals
- *********************************************************************************/
-
- // The main color table described above
- extern CTabHandle gAppColorTable;
-
-
- /*********************************************************************************
- Functions
- *********************************************************************************/
-
- OSStatus CopyResource (SInt16 inRes, SInt16 outRes, OSType theType, SInt16 theID);
-
- #endif /* _MOOFENCODE_ */
-
-